package com.graduate.service;

import com.db.mapper.InformationMapper;
import com.db.pojo.Information;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 信息模块调用接口
 *
 * @Createtime : 2020-04-01
 * @Creator : jingchu
 * @finishtime :2020-04-02
 */
@Service
public class InformationServiceImp implements InformationService {
    @Autowired
    private InformationMapper informationMapper;

    @Override
    public List<Information> getInformationList() {
        return informationMapper.getInformationList();
    }

    @Override
    public Information getInformation(String table) {
        return informationMapper.getInformation(table);
    }

    @Override
    public int updateIdIndex(String table, int index, int update_index) {
        return informationMapper.updateIdIndex(table, index, update_index);
    }

    @Override
    public int insertRecords(String filedsValue) {
        return informationMapper.insertRecords(filedsValue);
    }

    @Override
    public int insertTable(String table, String fieldsName, String filedsValue) {
        return informationMapper.insertTable(table, fieldsName, filedsValue);
    }

    @Override
    public int updateTable(String table, String setSql, String id) {
        return informationMapper.updateTable(table, setSql, id);
    }

    @Override
    public Map<String, Object> selectTable(String table, String id, String fieldsMsg) {
        return informationMapper.selectTable(table, id, fieldsMsg);
    }

    @Override
    public List<Map<String, Object>> selectTableList(String table, String fieldsMsg, String qeurySql) {
        return  informationMapper.selectTableList(table, fieldsMsg, qeurySql);
    }
}
